<template>
	<view class="cu-modal show" v-if="dialogVisible">
		<view class="cu-dialog">
			<view class="cu-bar bg-white justify-end">
				<view class="content">{{title}}</view>
				<view class="action" @tap="handleCancel">
					<text class="cuIcon-close text-red"></text>
				</view>
			</view>
			<view class="padding-xl">
				{{content}}
			</view>
			<view class="cu-bar bg-white justify-end">
				<view class="action">
					<button class="cu-btn line-orange text-orange" @tap="handleCancel">取消</button>
					<button class="cu-btn bg-orange margin-left" @tap="handleSure">确定</button>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: 'dialog-modal',
		props: ['title', 'content', 'dialogVisible'],
		methods: {
			handleCancel() {
				this.$emit('handleCancel')
			},
			handleSure() {
				this.$emit('handleSure')
			}
		}
	}
</script>

<style>
</style>
